<?php

/**
 * Ignus Framework
 *
 * @author Sergey Palyanov <sergey.palyanov@gmail.com>
 * @link http://code.google.com/p/ignus-php/
 * @license http://apache.org/licenses/LICENSE-2.0
 * @package Ignus
 * @subpackage App
 * @since 0.1
 */

namespace Ignus;

/**
 * @package Ignus
 * @subpackage App
 * @since 0.2
 */
abstract class Validator
{
    public static function validateEmail($email)
    {
        return self::validate($email, FILTER_VALIDATE_EMAIL);
    }

    public static function validate($value, $filter)
    {
        return filter_var($value, $filter) !== false;
    }
}
